package edu.llg.cli.command;

import cn.hutool.core.io.FileUtil;
import picocli.CommandLine;

import java.io.File;


/**
 * @author 隆利果
 * @version 1.0
 * @date 2024/2/23 14:14
 */
@CommandLine.Command(name = "list", mixinStandardHelpOptions = true,description = {"查看文件列表"})
public class ListCommand implements Runnable{

    @Override
    public void run() {
        String path = System.getProperty("user.dir")+ File.separator+"src/main/java/edu/llg/cli/command";
        File[] ls = FileUtil.ls(path);
        for (File l : ls) {
            System.out.println(l.getName());
        }
    }
}
